Method Summary |
|
__init__ (self,
file_,
template)
Parse the Template and place the content of the editable regions of the template in a dictionary with the names
of the ediatable regions as the keys. |
|
__getattr__ (self,
name)
Simulate attribute-access via editable region names. |
|
__getitem__ (self,
key)
Simulate indexed (tuple/list) and mapping-style access... |
|
__getslice__ (self,
i,
j)
Simulate list/tuple slicing access... |
|
__repr__(self)
|
|
__setattr__ (self,
name,
value)
Simulate attribute-access via editable region names. |
|
__setitem__ (self,
key,
value)
Simulate indexed (tuple/list) and mapping-style access... |
|
__setslice__ (self,
i,
j,
list)
Simulate list/tuple slicing access... |
|
__str__ (self)
Returns a string containing the complete HTML page for printing... |
|
append (self,
key,
value)
Append value to the end of the editable region specified in key. |
|
asDictionary (self)
Return a dictionary containing the text in editable regions of the page as it stands with the names of the
editable regions as the keys. |
|
asList (self)
Return the "list" as a real mapping... |
|
count (self,
item)
Simulate list's methods... |
|
get (self,
key)
Return the current value of the editable region "key". |
|
getTemplateRegion (self,
key)
Return the current value of the region in the template specified by key if it exists. |
|
getTemplateRegions (self)
Return a dictionary of the Template Editable Regions as they stand... |
|
has_key (self,
key)
Simulate mapping's methods... |
|
index (self,
item)
Simulate list's methods... |
|
items (self)
Simulate mapping's methods... |
|
keys (self)
Simulate mapping's methods... |
|
output (self,
file)
Merge the Editable Regions with the information in the Template to
create the HTML page to be output. |
|
set (self,
key,
value)
Set the editable region specified by key to value. |
|
swapTemplatePaths (self,
swapFrom,
swapTo)
Used to change the text in the template (not in the Editable Regions). |
|
_findTemplateRegions (self)
Private method to extract the names and content of the editable regions from the template file. |